//编辑技能标签
import React, { Component } from 'react'
import {
    View,
    Text,
    TextInput,
} from 'react-native';

import { skill_Style as styles } from '../../../../../styles';
import Modal from 'react-native-modal';
var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
var height = Dimensions.get('window').height;




export default class Skill_body extends Component {

    state = {
        isModalVisible: false
    }
    _showModal = () => this.setState({ isModalVisible: true })

    _hideModal = () => this.setState({ isModalVisible: false })


    render() {
        return (
            <View style={styles.skill_all}>
                <View style={[styles.skill_view, { width: width * 0.8 }]}>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                    <Text style={styles.skill_o}>Java</Text>
                </View>

                <Text style={styles.skill_add} onPress={this._showModal}>添加 + </Text>


                <Modal isVisible={this.state.isModalVisible}>
                    <View style={styles.skill_modal}>
                        <Text style={styles.skill_text}>请输入标签（最多10个字）</Text>
                        <TextInput style={styles.skill_input} underlineColorAndroid="#eeeeee"
                            placeholder="请输入内容" />

                        <View style={styles.skill_yesno}>
                            <Text onPress={this._hideModal} style={styles.skill_yes}>确定</Text>
                            <Text onPress={this._hideModal} style={styles.skill_no}>取消</Text>
                        </View>
                    </View>
                </Modal>

            </View >
        )
    }
}


